import request from '@/utils/request'

export function getDispatch(query) {
	return request({
		url: "/dispatch/list",
		method: "POST",
		data: query
	})
}

export function createDispatch(query) {
	return request({
		url: "/dispatch",
		method: "POST",
		data: query
	})
}

export function getDispatchInfo(id){
	return request({
		url:`/dispatch/${id}`,
		method:"GET"
	})
}


export function confirmDispatch(query) {
	return request({
		url: "/dispatch/confirm",
		method: "POST",
		data: query
	})
}

export function trailDisPatch(query) {
	return request({
		url: "/dispatch/trial",
		method: "PUT",
		data: query
	})
}

export function errorDispatch() {
	return request({
		url: `/dispatch/edit/${id}`,
		method: "GET"
	})
}
